package com.xzy.aaa;

import com.xzy.aaa.bean.CustomBean;
import com.xzy.aaa.postprocessor.CustomBeanFactoryPostProcessor;
import com.xzy.aaa.postprocessor.CustomBeanPostProcessor;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author xzy.xiao
 * @date 2023/7/4  19:48
 */
public class CustomApplication {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext acApplicationContext = new AnnotationConfigApplicationContext();

        acApplicationContext.registerBean(CustomBeanFactoryPostProcessor.class);
        acApplicationContext.registerBean(CustomBeanPostProcessor.class);
        acApplicationContext.registerBean("customBeanA", CustomBean.class);
        acApplicationContext.registerBean("customBeanB", CustomBean.class);
        acApplicationContext.registerBean("customBeanC", CustomBean.class);

        acApplicationContext.refresh();
        acApplicationContext.close();
    }
}
